const storage = {};

/**
 * @description 存储 storage 值
 * @param {String} name storage name
 * @param {String} value storage value
 */
storage.set = function (name = 'default', value = '') {
	uni.setStorageSync(`uni-${name}`, value)
}

/**
 * @description 获取 storage 值
 * @param {String} name storage name
 * @param {String} value storage value
 */
storage.get = function (name = 'default') {
	return uni.getStorageSync(`uni-${name}`)
}

/**
 * @description 删除 storage 值
 * @param {String} name storage name
 * @param {String} value storage value
 */

storage.remove = function (name = 'default') {
	uni.removeStorageSync(`uni-${name}`)
}


export default storage;